package com.haiyou.dc.api.entity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import javax.persistence.*;
import java.io.Serializable;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 订单管理
 *
 * @author Administrator
 * @date 2020-04-18 22:34:39
 */
@ApiModel(value = "订单管理")
@Data
@Accessors(chain = true)
@Table(name = "orders")
public class Orders implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 自增编号唯一值(订单ID)
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @ApiModelProperty(value = "自增编号唯一值(订单ID)", name = "id")
    private Long id;

    /**
     * 订单号
     */
    @Column(name = "order_no")
    @ApiModelProperty(value = "订单号", name = "orderNo")
    private String orderNo;

    /**
     * 下单用户ID
     */
    @Column(name = "user_id")
    @ApiModelProperty(value = "下单用户ID", name = "userId")
    private String userId;

    /**
     * 省
     */
    @Column(name = "province")
    @ApiModelProperty(value = "省", name = "province")
    private String province;

    /**
     * 购买类型：1个体，2批发
     */
    @Column(name = "buy_type")
    @ApiModelProperty(value = "购买类型：1个体，2批发", name = "buyType")
    private String buyType;

    /**
     * 支付方式：1现金，2积分，3运费
     */
    @Column(name = "pay_type")
    @ApiModelProperty(value = "支付方式：1现金，2积分，3运费", name = "payType")
    private String payType;

    /**
     * 后台是否确认批发可以支付，1是，0否，默认0
     */
    @Column(name = "is_confirm")
    @ApiModelProperty(value = "后台是否确认批发可以支付，1是，0否，默认0", name = "isConfirm")
    private String isConfirm;

    /**
     * 市
     */
    @Column(name = "city")
    @ApiModelProperty(value = "市", name = "city")
    private String city;

    /**
     * 订单地区
     */
    @Column(name = "area")
    @ApiModelProperty(value = "订单地区", name = "area")
    private String area;

    /**
     * 收货人
     */
    @Column(name = "consignee")
    @ApiModelProperty(value = "收货人", name = "consignee")
    private String consignee;

    /**
     * 收货人手机号
     */
    @Column(name = "consignee_phone")
    @ApiModelProperty(value = "收货人手机号", name = "consigneePhone")
    private String consigneePhone;

    /**
     * 收货人详细地址(配送地址)
     */
    @Column(name = "consignee_address")
    @ApiModelProperty(value = "收货人详细地址(配送地址)", name = "consigneeAddress")
    private String consigneeAddress;

    /**
     * 订单总价
     */
    @Column(name = "total_price")
    @ApiModelProperty(value = "订单总价", name = "totalPrice")
    private BigDecimal totalPrice;

    /**
     * 总消耗积分
     */
    @Column(name = "total_integral")
    @ApiModelProperty(value = "总消耗积分", name = "totalIntegral")
    private Integer totalIntegral;

    /**
     * 状态：0:未支付,1:已支付,2配送中，3已完成，4已取消
     */
    @Column(name = "status")
    @ApiModelProperty(value = "状态：0:未支付,1:已支付,2配送中，3已完成，4已取消", name = "status")
    private String status;

    /**
     * 运费，总价格内不包含运费
     */
    @Column(name = "postage")
    @ApiModelProperty(value = "运费，总价格内不包含运费", name = "postage")
    private BigDecimal postage;

    /**
     * 物流单号
     */
    @Column(name = "logistics_order_no")
    @ApiModelProperty(value = "物流单号", name = "logisticsOrderNo")
    private String logisticsOrderNo;

    /**
     * 物流公司名称
     */
    @Column(name = "logistics_company_name")
    @ApiModelProperty(value = "物流公司名称", name = "logisticsCompanyName")
    private String logisticsCompanyName;

    /**
     * 微信支付订单号
     */
    @Column(name = "transaction_id")
    @ApiModelProperty(value = "微信支付订单号", name = "transactionId")
    private String transactionId;

    /**
     * 支付时间
     */
    @Column(name = "pay_time")
    @ApiModelProperty(value = "支付时间", name = "payTime")
    private Date payTime;

    /**
     * 是否自动取消订单，1是系统，2是客户
     */
    @Column(name = "is_auto")
    @ApiModelProperty(value = "是否自动取消订单，1是系统，2是客户", name = "isAuto")
    private String isAuto;

    /**
     * 创建时间
     */
    @Column(name = "create_time")
    @ApiModelProperty(value = "创建时间", name = "createTime")
    private Date createTime;

    /**
     * 更新时间
     */
    @Column(name = "update_time")
    @ApiModelProperty(value = "更新时间", name = "updateTime")
    private Date updateTime;

}
